#include "mainwindow.h"
//#include <QApplication>
#include <QTextCodec>
#include <QtSingleApplication>

int main(int argc, char *argv[])
{
    QtSingleApplication a(argc, argv);

    if (a.isRunning())  //禁止打开多个客户端 【2013年9月25日】
    {
        QMessageBox::critical(NULL,QString::fromUtf8("警告"),QString::fromUtf8("请勿打开多个客户端！"));
            return 0;
    }

    MainWindow w;
    QTextCodec::setCodecForTr(QTextCodec::codecForName("utf8"));
    QTextCodec::setCodecForLocale(QTextCodec::codecForName("utf8"));
    QTextCodec::setCodecForCStrings(QTextCodec::codecForName("utf8"));
    w.show();
    
    return a.exec();
}
